﻿// //  ********************************************************************************
// //  Copyright (C) 2016 Sebastian Kenter. All rights reserved.
// // 
// //  Name    : MultiServerEngine | LoginServer | RegisterAccountRequestOperation.cs
// //  Created : 2016 - 02 - 18 10:53
// //  Modified: 2016 - 02 - 20 12:33
// //  ********************************************************************************

using Photon.SocketServer;
using Photon.SocketServer.Rpc;
using ServerFramework.Interfaces.Telegram;
using TypeDefs;

namespace LoginServer.Operations
{
    public class RegisterAccountRequestOperation : Operation
    {
        [DataMember(Code = (byte) ParameterCodes.GivenName, IsOptional = false, Name = "GivenName")]
        public string GivenName { get; set; }

        [DataMember(Code = (byte) ParameterCodes.Surname, IsOptional = false, Name = "Surname")]
        public string Surname { get; set; }

        [DataMember(Code = (byte) ParameterCodes.LoginName, IsOptional = false, Name = "Accountname")]
        public string Username { get; set; }

        [DataMember(Code = (byte) ParameterCodes.LoginPass, IsOptional = false, Name = "Password")]
        public string Password { get; set; }

        public RegisterAccountRequestOperation(IRpcProtocol protocol, ITelegram telegram)
            : base(protocol, new OperationRequest(telegram.Code, telegram.Parameters))
        {
        }

        public RegisterAccountRequestOperation()
        {
        }
    }
}
